export default function getCommonTime(milliseconds) {
        let date = new Date(milliseconds),
        time = date.toLocaleString(),//这种方法获取的时间格式根据电脑的不同而有所不同           
         formatTime = getFormatDate(date);//获取格式化后的日期
        return formatTime;
}
function getFormatDate(timeStr, dateSeparator, timeSeparator) {
     dateSeparator = dateSeparator ? dateSeparator : "-";
     timeSeparator = timeSeparator ? timeSeparator : ":";
     var date = new Date(timeStr),
             year = date.getFullYear(),// 获取完整的年份(4位,1970)
             month = date.getMonth(),// 获取月份(0-11,0代表1月,用的时候记得加上1)
             day = date.getDate(),// 获取日(1-31)
             hour = date.getHours(),// 获取小时数(0-23)
             minute = date.getMinutes(),// 获取分钟数(0-59)
                // seconds = date.getSeconds(),// 获取秒数(0-59)
                Y = year + dateSeparator,
                M = ((month + 1) > 9 ? (month + 1) : ('0' + (month + 1))) + dateSeparator,
                D = (day > 9 ? day : ('0' + day)) + ' ',
                h = (hour > 9 ? hour : ('0' + hour)) + timeSeparator,
                m = (minute > 9 ? minute : ('0' + minute)) ,
                // s = (seconds > 9 ? seconds : ('0' + seconds)),
                formatDate = Y + M + D + h + m;
        return formatDate;
    }